import { post, get } from "../utils/request/index"


export function login<T = any>(data: any) {
  console.log(data,"login")
  return post<T>({
    // url: 'http://10.10.10.167:7861/nmwlogin',
    url: `http://172.16.1.118:7861/nmwlogin`,
    data
  })
}

export function getInfo<T = any>() {
  return get<T>({
    // url: 'http://10.10.10.167:7861/auth/getUser',
    url: `${import.meta.env.VITE_APP_WEB_URL}/auth/getUser`,
  })
}
// 退出方法
export function logout<T = any>() {
  return post<T>({
    // url: 'http://10.10.10.167:7861/logout',
    url: `${import.meta.env.VITE_APP_WEB_URL}/logout`,
  })
}